Optimal. Leaf size=80 \[ \frac {(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {b (2 a-3 b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3664, 448} \[ \frac {(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {b (2 a-3 b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 448
Rule 3664
Rubi steps
\begin {align*} \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (-1+x^2\right ) \left (a-b+b x^2\right )^2}{x^4} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left ((2 a-3 b) b-\frac {(a-b)^2}{x^4}+\frac {(a-3 b) (a-b)}{x^2}+b^2 x^2\right ) \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {(a-b)^2 \cos ^3(e+f x)}{3 f}+\frac {(2 a-3 b) b \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.53, size = 72, normalized size = 0.90 \[ \frac {\left (-9 a^2+42 a b-33 b^2\right ) \cos (e+f x)+(a-b)^2 \cos (3 (e+f x))+4 b \sec (e+f x) \left (6 a+b \sec ^2(e+f x)-9 b\right )}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 80, normalized size = 1.00 \[ \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.13, size = 144, normalized size = 1.80 \[ \frac {6 \, a b \cos \left (f x + e\right )^{2} - 9 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac {a^{2} f^{11} \cos \left (f x + e\right )^{3} - 2 \, a b f^{11} \cos \left (f x + e\right )^{3} + b^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 12 \, a b f^{11} \cos \left (f x + e\right ) - 9 \, b^{2} f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.87, size = 155, normalized size = 1.94 \[ \frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (\frac {\sin ^{6}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )\right )+b^{2} \left (\frac {\sin ^{8}\left (f x +e \right )}{3 \cos \left (f x +e \right )^{3}}-\frac {5 \left (\sin ^{8}\left (f x +e \right )\right )}{3 \cos \left (f x +e \right )}-\frac {5 \left (\frac {16}{5}+\sin ^{6}\left (f x +e \right )+\frac {6 \left (\sin ^{4}\left (f x +e \right )\right )}{5}+\frac {8 \left (\sin ^{2}\left (f x +e \right )\right )}{5}\right ) \cos \left (f x +e \right )}{3}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 80, normalized size = 1.00 \[ \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right ) + \frac {3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 15.40, size = 128, normalized size = 1.60 \[ -\frac {32\,a\,b+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (64\,a\,b-32\,a^2\right )+12\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (24\,a^2-96\,a\,b+96\,b^2\right )-4\,a^2-32\,b^2}{f\,\left (3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-3\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2} \sin ^{3}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________